package com.imagination.applet.domain.revenue.order.model;

import com.imagination.applet.domain.common.entity.AbstractEntity;
import com.imagination.applet.domain.common.persistence.MapJsonConverter;
import jakarta.persistence.*;
import lombok.*;
import lombok.experimental.SuperBuilder;

import java.util.Currency;
import java.util.Map;

@SuperBuilder
@Entity
@Table(name = "t_user_orders")
@Getter
@Setter
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class UserOrder extends AbstractEntity {

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "trace_no")
    private String traceNo;

    @Enumerated(value = EnumType.STRING)
    @Column(name = "order_type")
    private OrderType orderType;

    @Column(name = "amount")
    private Integer amount;

    @Column(name = "currency")
    private Currency currency;

    @Column(name = "extensions", columnDefinition = "json")
    private String extensions;

    @Column(name = "status")
    private Integer status;

    @Column(name = "res_data")
    private String resData;

}
